package ch.bfh.abhmcm.SoftwareEngineeringAndDesign.view.mainframe.exportRFCPanel.listeners;

import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;

import ch.bfh.abhmcm.SoftwareEngineeringAndDesign.view.mainframe.exportRFCPanel.ExportRFCPanel;
import ch.bfh.abhmcm.SoftwareEngineeringAndDesign.view.mainframe.exportRFCPanel.exportRFCPanelSubs.ExportNewsTable;
import ch.bfh.abhmcm.SoftwareEngineeringAndDesign.view.mainframe.exportRFCPanel.exportRFCPanelSubs.ShowNewsDialog;

public class ShowNewsFromTableActionlistener extends MouseAdapter{
	
	private ExportRFCPanel exportRFCPanel;
	private ExportNewsTable newsTable;
	
	public ShowNewsFromTableActionlistener(ExportRFCPanel exportRFCPanel, ExportNewsTable newsTable){
		this.newsTable = newsTable;
		this.exportRFCPanel = exportRFCPanel;
	}

	@Override
	public void mouseClicked(MouseEvent e) {
		if (e.getClickCount() == 2) {

			new ShowNewsDialog(exportRFCPanel, newsTable.getSelectedNewsinTable());
		}
	}
		
	 

}
